#define _CRT_SECURE_NO_WARNINGS 1


#include<vector>
#include<iostream>

using namespace std;

int main()
{
	int n = 0;
	cin >> n;
	while (n--)
	{
		int size = 0;
		cin >> size;
		vector<int> v(size);
		int sum = 0;
		for (int i = 0; i < size; i++)
		{
			cin >> v[i];
			sum += v[i];
		}
		cout << sum << endl << endl;
	}

	return 0;
}